#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1010;
ll a[N][N], s[N][N];

int main() {
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	ll n, m, c; cin >> n >> m >> c;
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			cin >> a[i][j];
			s[i][j] = a[i][j] + s[i][j - 1] + s[i - 1][j] - s[i - 1][j - 1];
		}
	}
	ll maxx = 0, x = 0, y = 0;
	for (int i = 1; i <= n - c + 1; i++) {
		for (int j = 1; j <= m - c + 1; j++) {
			if (maxx < s[i + c - 1][j + c - 1] - s[i + c - 1][j - 1] - s[i - 1][j + c - 1] + s[i - 1][j - 1]) {
				maxx = s[i + c - 1][j + c - 1] - s[i + c - 1][j - 1] - s[i - 1][j + c - 1] + s[i - 1][j - 1];
				x = i;
				y = j;
			}
				
		}
	}
	cout << x << " " << y << '\n';
	return 0;
}